home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8668 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.rain.org!usenet
  2. From: "Guus Leeuw jr." <guusl@eiffel.com>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Towers of Hanoi
  5. Date: Tue, 05 Mar 1996 10:33:35 -0800
  6. Organization: Interactive Software Engineering Inc. http://www.eiffel.com/
  7. Message-ID: <313C88FF.5891C36B@eiffel.com>
  8. References: <4h5gq7$bmo@useneta1.news.prodigy.com>
  9. NNTP-Posting-Host: @outback.eiffel.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (X11; I; Linux 1.2.8 i586)
  14.  
  15. Craig Bellet wrote:
  16. > Learning to program in C++. Assigned problem of moving four progressively
  17. > larger rings sitting on a peg to another peg one ring at a time. The
  18. > object is to move the stack of rings to another peg. A small ring may be
  19. > placed upon a larger ring or an empty peg but not upon a larger ring.
  20.  
  21. What ??? You do a) or b) but a) ??? How is that to work ???
  22.  
  23. > A third peg is to facilitate this by temporarily holding rings. The
  24. > solution involves recursion but I am unable to figure out the algorithm.
  25. > Any thoughts?
  26.  
  27. I can't see any algorithm for this particular problem either.
  28.  
  29. If it would have been posted correctly, you won't get any answer here for two
  30. sophicticated reasons:
  31. a) it's about C++, this group is about C
  32. b) it's an assignment, youo have to your homework yourself, as we did that
  33. too.
  34.  
  35. Guus
  36.